package oop.conf;

import oop.controller.action.Action;

public class ActionDescriptor {

	private String name;
	private String requiredGroup;
	private boolean loginRequired;
	private String clazz;

	public ActionDescriptor(String name, String requiredGroup,
			boolean loginRequired, String clazz) {
		super();
		this.name = name;
		this.requiredGroup = requiredGroup;
		this.loginRequired = loginRequired;
		this.clazz = clazz;
	}

	public boolean isLoginRequired() {
		return loginRequired;
	}

	public String getRequiredGroup() {
		return requiredGroup;
	}

	public String getName() {
		return name;
	}

	@SuppressWarnings("unchecked")
	public Class<? extends Action> getActionClass() throws ClassNotFoundException {
		return (Class<? extends Action>) Class.forName(clazz);
	}
	
	
}
